<?php

use Illuminate\Support\Facades\Route;
use App\Http\Middleware\OpenShop\FeishuWebAuth;
use App\Http\Middleware\OpenShop\UserPermissionAuth;

Route::group(["prefix" => "merchant"], function () {
    Route::prefix('ads')->group(function () {
        Route::get('info', [\App\Http\Controllers\Marketing\Merchant\ShopAdvertisementController::class, 'info']);
    });
});
Route::middleware([FeishuWebAuth::class])
     ->prefix('web')->group(function () {
        Route::prefix('ads')->group(function () {
            Route::get('list', [\App\Http\Controllers\Marketing\Web\ShopAdvertisementController::class, 'list']);
            Route::post('upload', [\App\Http\Controllers\Marketing\Web\ShopAdvertisementController::class, 'upload']);
            Route::post('save', [\App\Http\Controllers\Marketing\Web\ShopAdvertisementController::class, 'save']);
            Route::get('info', [\App\Http\Controllers\Marketing\Web\ShopAdvertisementController::class, 'info']);
            Route::put('/status/{id}',
                [\App\Http\Controllers\Marketing\Web\ShopAdvertisementController::class, 'status']
            )->where('id', '[0-9]+');
        });
    });